<link href="../addons/jy_yiliao/resource/css/weui.css" rel="stylesheet">
<link href="../addons/jy_yiliao/resource/css/zan.css?v=1" rel="stylesheet">
<link href="../addons/jy_yiliao/resource/css/yuyue.css" rel="stylesheet">
<style>

        html,
        body {
            position: static;
            height: auto;
            -webkit-overflow-scrolling: touch;
        }

        .weui-cell:before {
            border: none;
            left: 0;
        }

        .his-calendar {
            margin-bottom: 10px;
        }

        .his-calendar .his-calendar-table caption.calendar-caption .caption-title.caption-sub-title {
            display: none;
        }

        .area-selector, .hospital-selector, .date-selector {
            position: relative;
            font-size: 12px;
        }

        .select-btn.red-color:after {
            border-color: #c03e3e;
        }

        .area-selector:after, .hospital-selector:after, .date-selector:after {
            content: " ";
            display: inline-block;
            height: 6px;
            width: 6px;
            border-width: 0 1px 1px 0;
            border-color: #C8C8CD;
            border-style: solid;
            -webkit-transform: rotate(45deg);
            transform: rotate(45deg);
            position: absolute;
            top: 50%;
            margin-top: -4px;
            right: 2px;
        }

        #listBorder .weui-cells:before, #listBorder .weui-cells:after {
            height: 0;
            border: none;
        }

        .his-calendar .his-calendar-table td.calendar-day {
            height: 36px;
        }

        .his-calendar .his-calendar-table caption.calendar-caption, .his-calendar .his-calendar-table .calendar-day.calendar-unvalid.active {
            background: #dbab7c;
            color: #fff;
        }
 .border {
            border: 1px solid #DBAB7C;
            border-radius: 2px;
        }

        .border .day-type {
            padding: 5px 8px;
            display: inline-block;
            font-size: 12px;
            color: #DBAB7C;
        }

        .border .day-type.selected {
            background: #DBAB7C;
            color: #fff;
        }

        .weui-cell:before {
            border: none;
            left: 0;
        }
        .weui-search-bar:after {
            background-color: #ffffff;
        }   
</style>
<div class='fui-page fui-page-current' ng-if="pagedata.op=='main'">
<div class="his-head" style="border-bottom: solid 1px #f2f2f2;">
	<div class="weui-search-bar no-before-line no-after-line" id="searchBar">
        <form id="searchForm" class="weui-search-bar__form">
            <div ng-click="pagedata.showinput=true" class="weui-search-bar__box">
                <input type="text" class="weui-search-bar__input" value="{{pagedata.params.keyword}}" placeholder="搜索大夫、病症">
            </div>
            <label ng-if="pagedata.params.keyword" ng-click="pagedata.params.keyword=''" class="weui-search-bar__label">
                <span>{{pagedata.params.keyword}}</span>
            </label>
        </form>
        <a ng-if="pagedata.showinput" href="javascript:" ng-click="pagedata.showinput=false" style="line-height:36px;padding-left:5px">取消</a>
    </div>
	<div class="white-background">
        <ul class="diseases-ul marginLeft12 marginRight12 his-flex">
		<li ng-repeat="value in pagedata.labels" href="javascript:" ng-click="pagedata.params.keyword=value.title;pagedata.params.labelid=value.id;pagedata.get_list();">{{value.title}}</li>
		</ul>
    </div>
	<div ng-if="pagedata.params.order!='tomday' && pagedata.params.order!='tomday2'" id="secondSearch" class="white-background" style="margin-top: -10px;">
        <div class="his-flex his-center">
            <div ng-click="pagedata.showtype=1;pagedata.isshow=true" class="his-flex-grow" style="width:33.33%;">
                    <span class="select-btn area-selector padding15" style="display: inline-block;">{{pagedata.areatitle||'全国'}}</span>
            </div>
            <div ng-click="pagedata.showtype=2;pagedata.isshow=true" class="his-flex-grow" style="width:33.33%;">
                    <span class="select-btn hospital-selector padding15 " style="display: inline-block;">{{pagedata.storetitle||'医馆'}}</span>
            </div>
            <div ng-click="pagedata.showtype=3;pagedata.isshow=true" class="his-flex-grow" style="width:33.33%;">
                    <span class="select-btn date-selector padding15" style="display: inline-block;">{{pagedata.params.daydata||'日期'}}</span>
            </div>
        </div>
    </div>
	<div ng-if="pagedata.params.order=='tomday' || pagedata.params.order=='tomday2'" id="switch" class="his-flex white-background" style="padding: 10px 12px;position:relative;margin-top: 10px;">
                <div class="deep-color"><span class="title-block">医馆出诊大夫</span></div>
                <div class="border">
                    <span ng-class="{'day-type':1,'selected':pagedata.params.order=='tomday'}" ng-click="pagedata.params.order='tomday';pagedata.get_list();">今天</span>
                    <span ng-class="{'day-type':1,'selected':pagedata.params.order=='tomday2'}" ng-click="pagedata.params.order='tomday2';pagedata.get_list();">明天</span>
                </div>
    </div>
    <div ng-if="pagedata.showtype==1 && pagedata.isshow" class="weui-cells weui-cells_radio" style="position: relative;z-index: 1001;">
			<label ng-click="pagedata.isshow=false;pagedata.params.area_id=0;pagedata.areatitle='';pagedata.get_list();" class="weui-cell weui-check__label" for="quanguo">
				<div class="weui-cell__bd">不限</div>
				<div class="weui-cell__ft">
					<input type="radio" name="city" checked="" class="weui-check" id="quanguo" value="">
					<span class="weui-icon-checked"></span>
				</div>
			</label>
			<label ng-click="pagedata.isshow=false;pagedata.params.area_id=a.id;pagedata.areatitle=a.title;pagedata.get_list();" ng-repeat="a in pagedata.area" class="weui-cell weui-check__label">
				<div class="weui-cell__bd ">{{a.title}}</div>
				<div class="weui-cell__ft">
					<input type="radio" name="city" class="weui-check" value="{{a.title}}">
					<span class="weui-icon-checked"></span>
				</div>
			</label>
	</div>
    <div ng-if="pagedata.showtype==2 && pagedata.isshow" class="weui-cells weui-cells_radio" style="max-height: 320px;overflow: scroll;position: relative;z-index: 1001;">
		<label ng-click="pagedata.isshow=false;pagedata.params.storeid=0;pagedata.storetitle='';pagedata.get_list();" class="weui-cell weui-check__label" for="yiguan">
			<div class="weui-cell__bd">
				<div class="weui-cell__bd">不限</div>
			</div>
			<div class="weui-cell__ft">
				<span id="other_info" class="marginLeft20 red-color font12"></span>
				<input type="radio" name="hospital" checked="" class="weui-check" id="yiguan" value="">
				<span class="weui-icon-checked"></span>
			</div>
		</label>
		<label ng-repeat="item in pagedata.stores" ng-click="pagedata.isshow=false;pagedata.params.storeid=item.id;pagedata.storetitle=item.title;pagedata.get_list();" class="weui-cell weui-check__label" for="MD_wusi">
			<div class="weui-cell__bd">
				<div class="weui-cell__bd marginBottom5">
				<span style="vertical-align: middle;">{{item.title}}</span>
				<button class="weui-btn weui-btn_mini weui-btn_warn yellow-background his-noborder radius2 font12 marginLeft20" style="line-height: 2;vertical-align: middle;position: absolute;margin-top: -1px;">进入地图</button>
				</div>
				<div class="weui-cell__bd font12 light-color">{{item.address}}</div>
			</div>
			<div class="weui-cell__ft">
				<span id="other_info" class="marginLeft20 red-color font12"></span>
				<input type="radio" name="hospital" class="weui-check">
				<span class="weui-icon-checked"></span>
			</div>
		</label>
	</div>
        <div ng-if="pagedata.showtype==3 && pagedata.isshow" class="white-background paddingBottom0" style="position: relative;z-index: 1001;">
            <div id="calendarList" class="padding15" style="max-height: 320px;overflow: scroll;border-bottom: solid 1px #f2f2f2;">
			<div ng-repeat="item in pagedata.months" class="his-calendar">
			<table class="his-calendar-table">
			  <caption class="calendar-caption" style="padding:8px">
				<div class="caption-title">{{item.title}}</div>
			  </caption>
			  <thead>
				<tr>
				  <th>日</th>
				  <th>一</th>
				  <th>二</th>
				  <th>三</th>
				  <th>四</th>
				  <th>五</th>
				  <th>六</th>
				</tr>
			  </thead>
			  <tbody>
				<tr ng-repeat="dli in item.days">
				  <td ng-repeat="d in dli.indays" ng-class="{'calendar-day':1, 'calendar-empty':d.ispass,'calendar-valid':!d.ispass}">
					<div ng-click="pagedata.isshow=false;pagedata.params.daydata=d.daydata;pagedata.get_list();" ng-if="!d.ispass">{{d.day}}
						<span style="float: right" class="showCity2021-09-01 light-color font12"></span>
					</div>
				  </td>
				</tr>
			  </tbody>
			</table>
		  </div>
		</div>
        <div class="his-right padding-5-15" ng-click="pagedata.isshow=false;pagedata.params.daydata='';pagedata.get_list();">
                <button type="button" class="weui-btn weui-btn_mini weui-btn_warn clear-date radius2 his-noborder" style="background: #dbab7c;">不限
                </button>
         </div>
        </div>
        <div id="module" class="weui-mask_transparent his-hide" style="top: 138px;background: rgba(0, 0, 0, 0.2);"></div>
    </div>
</div>
<div class="pull-wrapper" style="position: static; padding-top: 110px;padding-bottom:3rem">
	<div class="pull-border" style="position: static;">
		<div ng-include="sys_html('common/_workerlist')"></div>
	</div>
</div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script type="text/javascript">
scope.get('jy_yiliao/get_data/getarea/',function(res){
	scope.pagedata.area=res.list
	scope.$evalAsync();
});
scope.get('jy_yiliao/get_data/getmonths/',function(res){
	scope.pagedata.months=res.months
	scope.$evalAsync();
});
scope.pagedata.getstores=function(area_id){
	area_id=area_id?area_id:0
	scope.get('jy_yiliao/store_list/getlist/area_id='+area_id,function(res){
		scope.pagedata.stores=res.list
		scope.$evalAsync();
	});
}
scope.pagedata.getstores();
//手机软键盘--搜索
$("body").keydown(function() {
    if (event.keyCode == "13") {
        $('#searchsub').click();
    }
});
</script>